﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SimpleChat
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            MessageManager.Instance.Initialize();
            MessageManager.Instance.Start();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Index index = new Index();
            index.Show();
            this.Hide();
        }//login button

        private void label5_Click(object sender, EventArgs e)
        {
            Register register = new Register();
            register.Show();
        }//register button

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            Form2 form2 = new Form2();
            form2.Show();
        }

        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            MessageManager.Instance.Stop();
        }
    }
}
